<template>
  <div>
    <el-button icon="el-icon-edit" size="mini" type="success" @click="to"></el-button>
    <eForm ref="form" :dict-id="dictId" :sup_this="sup_this" :is-add="false"/>
  </div>
</template>
<script>
import eForm from './form/dictDetail'
export default {
  components: { eForm },
  props: {
    data: {
      type: Object,
      required: true
    },
    dictId: {
      type: String,
      required: true
    },
    currentData: {
      type: Object,
      required: true
    },
    sup_this: {
      type: Object,
      required: true
    }
  },
  methods: {
    to() {
      const _this = this.$refs.form
      _this.form = {
        label: this.data.label, dict_code: this.data.dict_code, sort_no_two: this.data.sort_no_two,
        dict_val: this.data.dict_val, parent_code: this.data.parent_code,
        is_enabled: this.data.is_enabled, parent_id: this.data.parent_id,
        id: this.data.id, dict_detail_id: this.data.dict_detail_id, remark: this.data.remark
      }
      _this.currentData = this.currentData
      _this.getDictDetail()
      _this.dialog = true
    }
  }
}
</script>

<style scoped>
  div{
    display: inline-block;
    margin-right: 3px;
  }
</style>
